package com.booksystem.campuslibrarymanagementsystem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.booksystem.campuslibrarymanagementsystem.commen.request.userquest.BookBorrowrequst.Approval;
import com.booksystem.campuslibrarymanagementsystem.commen.request.userquest.ReservaTable;
import com.booksystem.campuslibrarymanagementsystem.commen.result.userresuilt.ReservationTablelist;
import com.booksystem.campuslibrarymanagementsystem.entity.BooksTable;
import com.booksystem.campuslibrarymanagementsystem.entity.BorrowApprovalsTable;
import com.booksystem.campuslibrarymanagementsystem.entity.RenewalapprovalTable;
import com.booksystem.campuslibrarymanagementsystem.entity.ReservationTable;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.List;

public interface ReservationTableService extends IService<ReservationTable> {
    int add(ReservationTable bb);
    List<ReservationTable> existsByAccountAndBookidi(String account, int bookid);
    List<ReservationTablelist> appointlist(@Param("account") String account);
    List<ReservationTablelist> appointliststatus(String account, String status);
    int deleteByAccountAndBookid(@Param("account") String account, @Param("reservationid") int reservationid);

    int updatestatus(String account, int reservationid, String status);
    BooksTable aaa(int bookid);
    ReservaTable queryid(int bookid);
    //通过账户id查询借阅记录，获得该账户借阅记录
    List<ReservationTable> queryByAccount(String account);

    List<ReservationTable> querydislist(String status);
    void unapproval(@Param("account") String account, @Param("approvalTime") LocalDate approvalTime ,
                    @Param("bookid") String bookid,
                    @Param("Approvalstate")String Approvalstate);
    void onapproval(@Param("account") String account, @Param("approvalTime") LocalDate approvalTime ,
                    @Param("bookid") String bookid,
                    @Param("Approvalstate")String Approvalstate);



}
